Component({
  //externalClasses: ['custom-class'],
  properties: {
    category: {
      type: Array,
    },
  },
  data: {
    Idindex: 0,
  },
  methods: {
    onParentChange(event) {
      this.setData({
        Idindex: event.detail.index,
      });
      console.log(this.data.index);
      // this.setActiveKey(event.detail.index, 0).then(() => {    wx-for="{{category[index].children.length}}"
      //   this.triggerEvent('change', [this.data.activeKey, this.data.subActiveKey]);
      // });
    },
    // onChildChange(event) {
    //   this.setActiveKey(this.data.activeKey, event.detail.index).then(() => {
    //     this.triggerEvent('change', [this.data.activeKey, this.data.subActiveKey]);
    //   });
    // },
    // changCategory(event) {
    //   const { item } = event.currentTarget.dataset;
    //   this.triggerEvent('changeCategory', {
    //     item,
    //   });
    // },
  },
});
